//存取登录的token
import VueCookies from "vue-cookies";

//存储token的键名
const key = "com-token";

//操作：设置token
export function setToken(value) {
  VueCookies.set(key, value, "30d");
}

//获取token
export function getToken(){
    return VueCookies.get(key)
}
//移除token
export function removeToken(){
    VueCookies.remove(key)
}

//判断是否有token
export function hasToken(){
    return VueCookies.isKey(key)
}